/* 
 * File:   game_protocol.h
 * Author: iezahel
 *
 * Created on December 27, 2008, 4:48 PM
 */

#ifndef _GAMEPROTOCOL_H
#define	_GAMEPROTOCOL_H

#define PROTOCOL_VERSION 0x100
#define MAX_CMD_BUF 2048

typedef  enum GAME_COMMANDS {
    GAME_COMMAND_INITIAL_CONFIG = 0,
    GAME_COMMAND_RESUME,
    GAME_COMMAND_PAUSE,
    GAME_COMMAND_PLAYER_STATE,
    GAME_COMMAND_BALL_STATE,
    GAME_COMMAND_MISSED_BALL,
} GAME_COMMANDS;

typedef struct GameCommand {
    int version; /* Which protocol version is being used */
    GAME_COMMANDS cmd_id; /* ID of the command */
    int data_size; /* The size of the command data (in bytes) */
    char data[MAX_CMD_BUF];
} GameCommand;
#define GAME_COMMAND_HEADER_SIZE 12

#endif	/* _GAMEPROTOCOL_H */

